<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:ui>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>无标题文档</title>
		<link rel="stylesheet" type="text/css" charset="utf-8"
			href="/hrms/css/styles.css" />
		<link rel="stylesheet" type="text/css" charset="utf-8"
			href="/hrms/css/flexigrid.css" />
		<link rel="stylesheet" type="text/css" charset="utf-8"
			href="/hrms/css/flexigrid.pack.css" />
		<link rel="stylesheet" type="text/css" charset="utf-8"
			href="/hrms/css/ztree.css" />
		<script language="javascript"
			src="/hrms/js/my97/WdatePicker.js"></script>

		<script type="text/javascript"
			src="/hrms/js/jquery-1.7.2.min.js"></script>

		<script type="text/javascript"
			src="/hrms/js/jquery.container.js"></script>

		<script type="text/javascript"
			src="/hrms/js/common.js"></script>

		<script type="text/javascript"
			src="/hrms/js/flexigrid.pack.js"></script>

		<script type="text/javascript">
		var dept_setting_add = {
			check: {
				enable: true,
				chkStyle: "radio",
				radioType: "all"
			},
			view: {
				dblClickExpand: false
			},
			data: {
				simpleData: {
					enable: true
				}
			},
			callback: {
				onClick: onClick_dept_add,
				onCheck: onCheck_dept_add
			}
		};
		
		var dept_setting_update = {
			check: {
				enable: true,
				chkStyle: "radio",
				radioType: "all"
			},
			view: {
				dblClickExpand: false
			},
			data: {
				simpleData: {
					enable: true
				}
			},
			callback: {
				onClick: onClick_dept_update,
				onCheck: onCheck_dept_update
			}
		};
		 var zDeptNodes =[
			{id:1, pId:0, name:"总经理办公室"},
			{id:2, pId:0, name:"财务部"},
			{id:4, pId:0, name:"软件研发部"}
		 ];
		 
		 function onClick_dept_add(e, treeId, treeNode) {
			var zTree = $.fn.zTree.getZTreeObj("dept_treeDemo_add");
			zTree.checkNode(treeNode, !treeNode.checked, null, true);
			return false;
		}
		
		function onClick_dept_update(e, treeId, treeNode) {
			var zTree = $.fn.zTree.getZTreeObj("dept_treeDemo_update");
			zTree.checkNode(treeNode, !treeNode.checked, null, true);
			return false;
		}
		function onCheck_dept_add(e, treeId, treeNode) {
			var zTree = $.fn.zTree.getZTreeObj("dept_treeDemo_add"),
			nodes = zTree.getCheckedNodes(true),
			v = "";
			for (var i=0, l=nodes.length; i<l; i++) {
				v += nodes[i].name + ",";
			}
			if (v.length > 0 ) v = v.substring(0, v.length-1);
			var cityObj = $("#deptid_add");
			cityObj.attr("value", v);
		}
		
		function onCheck_dept_update(e, treeId, treeNode) {
			var zTree = $.fn.zTree.getZTreeObj("dept_treeDemo_update"),
			nodes = zTree.getCheckedNodes(true),
			v = "";
			for (var i=0, l=nodes.length; i<l; i++) {
				v += nodes[i].name + ",";
			}
			if (v.length > 0 ) v = v.substring(0, v.length-1);
			var cityObj = $("#deptid_update");
			cityObj.attr("value", v);
		}
 
		function showMenu_dept_add() {
			var cityObj = $("#deptid_add");
			var cityOffset = $("#deptid_add").offset();
			$("#dept_menuContent_add").slideDown("fast");
 
			$("body").bind("mousedown", onBodyDown_dept_add);
		}
		
		function showMenu_dept_update() {
			var cityObj = $("#deptid_update");
			var cityOffset = $("#deptid_update").offset();
			$("#dept_menuContent_update").slideDown("fast");
 
			$("body").bind("mousedown", onBodyDown_dept_update);
		}
		function hideMenu_dept_add() {
			$("#dept_menuContent_add").fadeOut("fast");
			$("body").unbind("mousedown", onBodyDown_dept_add);
		}
		
		function hideMenu_dept_update() {
			$("#dept_menuContent_update").fadeOut("fast");
			$("body").unbind("mousedown", onBodyDown_dept_update);
		}
			function onBodyDown_dept_add(event) {
			if (!(event.target.id == "menuBtn" || event.target.id == "deptid_add" || event.target.id == "dept_menuContent_add" || $(event.target).parents("#dept_menuContent_add").length>0)) {
				hideMenu_dept_add();
			}
		}
		
		function onBodyDown_dept_update(event) {
			if (!(event.target.id == "menuBtn" || event.target.id == "deptid_update" || event.target.id == "dept_menuContent_update" || $(event.target).parents("#dept_menuContent_update").length>0)) {
				hideMenu_dept_update();
			}
		}
		
	$(document).ready( function() {
		$.fn.zTree.init($("#dept_treeDemo_add"), dept_setting_add, zDeptNodes);
		$.fn.zTree.init($("#dept_treeDemo_update"), dept_setting_update, zDeptNodes);
		demand("staffInfomgr");
		$("#add").click(function(){
			$("#staff_add").dialog("close");
		});
		$("#update").click(function(){
			$("#staff_update").dialog("close");
		});
		$("#staff_update").dialog("close");
		$("#staff_add").dialog("close");
	});
</script>

	</head>

	<body onload="loadDemand('staffInfomgr')">
		<div align="center">
			<br />
			<br />
			<br />
			<table width="80%" border="0" class="table_frame" align="center">

				<thead class="table_title">
					<tr>
						<td align="center">
							在司员工信息管理
						</td>
					</tr>
				</thead>
				<tr>
					<td>
						<table width="100%" border="0" class="table_block">
							<tr>
								<td align="right">
									员工编号：
								</td>
								<td align="left">
									<input name="" type="text" size="20" />
									&nbsp;
								</td>
								<td align="right">
									员工姓名：
								</td>
								<td align="left">
									<input name="Input" type="text" size="20" />
								</td>
							</tr>
							<tr>
								<td colspan="4" align="center">
									<input name="" type="button" value="查询" class="button_image" />
									<input name="" type="reset" class="button_image" />
								</td>

							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td height="20"></td>
				</tr>
				<tr>
					<td>
						<div>
							<table id="querylist"></table>
							<script type="text/javascript">
	$("#querylist").flexigrid( {
		url :'post2.php',
		dataType :'json',
		colModel : [ {
			display :'员工编号',
			name :'iso',
			width :160,
			sortable :true,
			align :'center'
		}, {
			display :'员工姓名',
			name :'name',
			width :180,
			sortable :true,
			align :'left'
		}, {
			display :'所在部门',
			name :'printable_name',
			width :120,
			sortable :true,
			align :'left'
		}, {
			display :'职务',
			name :'iso3',
			width :130,
			sortable :true,
			align :'left',
			hide :true
		}, {
			display :'办公电话',
			name :'numcode',
			width :80,
			sortable :true,
			align :'right'
		},{
			display :'工作邮箱',
			name :'numcode',
			width :80,
			sortable :true,
			align :'right'
		},{
			display :'入职时间',
			name :'numcode',
			width :80,
			sortable :true,
			align :'right'
		},{
			display :'员工状态',
			name :'numcode',
			width :80,
			sortable :true,
			align :'right'
		} ],
		buttons : [ {
			name :'员工入职维护',
			bclass :'add',
			onpress :add
		}, {
			name :'在司员工信息编辑',
			bclass :'edit',
			onpress :update
		}, {
			name :'在司员工离职',
			bclass :'delete',
			onpress :remove
		}, {
			name :'生成通讯录',
			bclass :'add',
			onpress :genAddList
		}, {
			separator :true
		} ],
		searchitems : [ {
			display :'员工编号',
			name :'iso'
		}, {
			display :'员工姓名',
			name :'name',
			isdefault :true
		} ],
		sortname :"iso",
		sortorder :"asc",
		usepager :true,
		title :'在司员工信息列表',
		funcp :true,
		rp :15,
		showTableToggleBtn :true,
		width :1000,
		height :200
	});
	function add(com, grid) {
		$("#staff_add").dialog("open");
	}
	function update(com, grid) {
		$("#staff_update").dialog("open");
	}
	function remove(com, grid) {
		alert("请先选择您要删除的数据！");
	}
	function genAddList(com,grid){
		alert("通讯录已经生成！");
	}
</script>
						</div>
					</td>
				</tr>
			</table>
			<div align="center">
				<br />
				<br />
				<table width="90%" border="0" class="table_frame" align="center">
					<tr>
						<td align="center">
							<input id="demand" name="" type="button" value="需求收集"
								class="button_image" />
						</td>
					</tr>
					<tr>
						<td align="center">
							<div id="demand_input" style="display: none">
								<textarea rows="15" cols="120" id="demand_text"></textarea>
								<br />
								<input id="demand_save" type="button" class="button_image"
									value="保存需求" />
							</div>
						</td>
					</tr>
				</table>
				<table id="demand_des" width="90%" border="0" class="table_frame"
					align="center">
					<thead align="center" class="table_title">
						<tr>
							<td>
								需求描述
							</td>
						</tr>
					</thead>
				</table>
			</div>
		</div>
		<ui:dialog id="staff_update" title="员工信息维护" height="300" width="750"
			modal="true">
			<form id="aform"
				action="/eaip/webservice/resources/session/login"
				method="post">
				<ui:tabs id="tabs" width="100%">
					<ul>
						<li>
							<a href="#baseInfo">在司基本信息</a>
						</li>
						<li>
							<a href="#personInfo">人事档案信息</a>
						</li>
						<li>
							<a href="#salaryInfo">薪资发放</a>
						</li>
						<li>
							<a href="#checkInfo">每月考勤</a>
						</li>
						<li>
							<a href="#trainInfo">员工培训考核</a>
						</li>
					</ul>
					<div id="baseInfo">
						<table class="table_frame" width="100%">
							<tr>
								<td align="right">
									员工编号:
								</td>
								<td align="left">
									<input type="text" id="funcname" name="funcPO.funcname"
										readonly="readonly" maxlength="128"></input>
									<font color="red">*</font>
								</td>
								<td align="right">
									员工姓名:
								</td>
								<td align="left">
									<input type="text" id="funcname" name="funcPO.funcname"
										readonly="readonly" maxlength="128"></input>
								</td>
							</tr>
							<tr>
								<td align="right">
									入职时间:
								</td>
								<td align="left">
									<ui:datepicker id="entryDate" />
									<font color="red">*</font>
								</td>
								<td align="right">
									所在部门:
								</td>
								<td align="left">
									<input id="deptid_add" type="text" readonly="readonly"
										size="20" onclick="showMenu_dept_add();"
										ondblclick="this.value='';" />
									<div id="dept_menuContent_add" class="dept_menuContent_add"
										style="display: none; position: absolute;">
										<ul id="dept_treeDemo_add" class="ztree"
											style="margin-top: 0; width: 180px; height: 100px;"></ul>
									</div>
									<font color="red">*</font>
								</td>
							</tr>
							<tr>
								<td align="right">
									职务:
								</td>
								<td align="left">
									<select>
										<option>
											取自职务字典
										</option>
									</select>
								</td>
								<td align="right">
									办公电话:
								</td>
								<td align="left">
									<input type="text" id="createdate" readonly="readonly" />
								</td>
							</tr>
							<tr>
								<td align="right">
									工作邮箱:
								</td>
								<td align="left">
									<input id="" type="text" />
								</td>
								<td align="right">
									职等:
								</td>
								<td align="left">
									<select>
										<option value="">
											取自职等字典
										</option>
									</select>
								</td>
							</tr>
							<tr>
								<td align="right">
									职级:
								</td>
								<td align="left">
									<select>
										<option value="">
											取自职级字典
										</option>
									</select>
								</td>
								<td align="right">
									社保增员时间:
								</td>
								<td align="left">
									<ui:datepicker id="ssAddDate" />
								</td>
							</tr>
							<tr>
								<td align="right">
									公积金增员时间:
								</td>
								<td align="left">
									<ui:datepicker id="psAddDate" />
								</td>
								<td align="right">
									档案调入时间:
								</td>
								<td align="left">
									<ui:datepicker id="fInDate" />
								</td>
							</tr>
							<tr>
								<td align="right">
									集体户口转入时间:
								</td>
								<td align="left">
									<ui:datepicker id="reInDate" />
								</td>
								<td align="right">
									社保减员时间:
								</td>
								<td align="left">
									<ui:datepicker id="foDelDate" />
								</td>
							</tr>
							<tr>
								<td align="right">
									公积金减员时间:
								</td>
								<td align="left">
									<ui:datepicker id="reInDate" />
								</td>
								<td align="right">
									档案调出时间:
								</td>
								<td align="left">
									<ui:datepicker id="fOutDelDate" />
								</td>
							</tr>
							<tr>
								<td align="right">
									集体户口转出时间:
								</td>
								<td align="left">
									<ui:datepicker id="reOutDate" />
								</td>
								<td align="right">
									岗位类别:
								</td>
								<td align="left">
									<select>
										<option>
											取自岗位类别字典
										</option>
									</select>
								</td>
							</tr>
							<tr>
								<td align="right">
									在职状态:
								</td>
								<td align="left">
									<select>
										<option>
											在职状态字典
										</option>
									</select>
								</td>
								<td align="right">
									备注:
								</td>
								<td align="left">
									<textarea rows="4" cols="40"></textarea>
								</td>
							</tr>
							<tr>
								<td align="right" colspan="2">
									<input type="button" value="保存" class="button_image" id="add" />
								</td>
								<td align="left" colspan="2">
									<input type="reset" value="重置" class="button_image" />
								</td>
							</tr>
						</table>
					</div>
					<div id="personInfo">
						<font class="shadow">人事合同</font>
						<table width="100%" class="tab_tbody_list">
							<thead>
								<tr>
									<td>
										起始时间
									</td>
									<td>
										结束时间
									</td>
									<td>
										合同编号
									</td>
									<td>
										合同种类
									</td>
									<td>
										合同状态
									</td>
									<td>
										合同期限
									</td>
									<td>
										备注
									</td>
									<td>
										操作
									</td>
								</tr>
							</thead>
							<tr>
								<td>
									2012-01-01
								</td>
								<td>
									2012-12-31
								</td>
								<td>
									TH0023
								</td>
								<td>
									正式合同
								</td>
								<td>
									正常
								</td>
								<td>
									有期限
								</td>
								<td>
									33
								</td>
								<td>
									<input type="button" value="修改" class="button_image" />
									<input type="button" value="删除" class="button_image" />
								</td>
							</tr>
						</table>
						<font class="shadow">调动记录</font>
						<table width="100%" class="tab_tbody_list">
							<thead>
								<tr>
									<td>
										调动日期
									</td>
									<td>
										调动种类
									</td>
									<td>
										原部门
									</td>
									<td>
										原职位
									</td>
									<td>
										新部门
									</td>
									<td>
										新职位
									</td>
									<td>
										调用原因
									</td>
									<td>
										备注
									</td>
									<td>
										操作
									</td>
								</tr>
							</thead>
							<tr>
								<td>
									2012-01-01
								</td>
								<td>
									升职
								</td>
								<td>
									软件研发部
								</td>
								<td>
									软件工程师
								</td>
								<td>
									软件研发部
								</td>
								<td>
									高级软件工程师
								</td>
								<td>
									工作努力，能力突出
								</td>
								<td>
									111
								</td>
								<td>
									<input type="button" value="修改" class="button_image" />
									<input type="button" value="删除" class="button_image" />
								</td>
							</tr>
						</table>
						<font class="shadow">离职管理</font>
						<table width="100%" class="tab_tbody_list">
							<thead>
								<tr>
									<td>
										离职日期
									</td>
									<td>
										离职种类
									</td>
									<td>
										审批人
									</td>
									<td>
										离职原因
									</td>
									<td>
										备注
									</td>
									<td>
										操作
									</td>
								</tr>
							</thead>
							<tr>
								<td>
									2012-01-01
								</td>
								<td>
									辞职
								</td>
								<td>
									王经理
								</td>
								<td>
									新工作
								</td>
								<td>
									111
								</td>
								<td>
									<input type="button" value="修改" class="button_image" />
									<input type="button" value="删除" class="button_image" />
								</td>
							</tr>
						</table>
					</div>
					<div id="salaryInfo">
						<table width="100%" class="tab_tbody_list">
							<tr>
								<td>
								起始年月：
								</td>
								<td>
								<input type="text" class="Wdate" id="d28"
									onclick="WdatePicker({skin:'whyGreen',dateFmt:'yyyy年MM月',maxDate:'%y-%M'})" />
								</td>
								<td>
								截至年月：
								</td>
								<td>
								<input type="text" class="Wdate" id="d28"
									onclick="WdatePicker({skin:'whyGreen',dateFmt:'yyyy年MM月',maxDate:'%y-%M'})" />
								</td>
								<td>
								<input type="button" value="查询" class="button_image" />
								</td>
							</tr>
						</table>
						<br />
						<table width="100%" class="tab_tbody_list">
							<thead>
								<tr>
									<td>
										年-月
									</td>
									<td>
										员工编号
									</td>
									<td>
										员工姓名
									</td>
									<td>
										基本工资
									</td>
									<td>
										税前总收入
									</td>
									<td>
										社保总额
									</td>
									<td>
										所得税
									</td>
									<td>
										税后收入
									</td>
									<td>
										薪资帐套
									</td>
									<td>操作</td>
								</tr>
							</thead>
							<tr>
								<td>
									2012-01
								</td>
								<td>
									TH20012
								</td>
								<td>
									张三
								</td>
								<td>
									2500.1
								</td>
								<td>
									2810.1
								</td>
								<td>
									190.0
								</td>
								<td>
									0.0
								</td>
								<td>
									2610.1
								</td>
								<td>
									正式员工帐套
								</td>
								<td>
									<input type="button" value="修改" class="button_image" />
									<input type="button" value="删除" class="button_image" />
								</td>
							</tr>
						</table>
					</div>
					<div id="checkInfo">
						<table width="100%" class="tab_tbody_list">
							<tr>
								<td>
								起始年月：
								</td>
								<td>
								<input type="text" class="Wdate" id="d28"
									onclick="WdatePicker({skin:'whyGreen',dateFmt:'yyyy年MM月',maxDate:'%y-%M'})" />
								</td>
								<td>
								截至年月：
								</td>
								<td>
								<input type="text" class="Wdate" id="d28"
									onclick="WdatePicker({skin:'whyGreen',dateFmt:'yyyy年MM月',maxDate:'%y-%M'})" />
								</td>
								<td>
								按天/小时：
								</td>
								<td>
									<select>
										<option>天</option>
										<option>小时</option>
									</select>
								</td>
								<td>
								<input type="button" value="查询" class="button_image" />
								</td>
							</tr>
						</table>
						<br />
						<table width="100%" class="tab_tbody_list">
							<thead>
								<tr>
									<td>
										考勤日期
									</td>
									<td>
										员工编号
									</td>
									<td>
										员工姓名
									</td>
									<td>
										班次
									</td>
									<td>
										上班
									</td>
									<td>
										下班
									</td>
									<td>
										迟到
									</td>
									<td>
										早退
									</td>
									<td>
										缺勤
									</td>
									<td>
										请假
									</td>
									<td>
										出差
									</td>
									<td>
										公出
									</td>
									<td>
										加班
									</td>
								</tr>
							</thead>
							<tr>
								<td>
									2012-01-01
								</td>
								<td>
									TH20012
								</td>
								<td>
									张三
								</td>
								<td>
									常日班
								</td>
								<td>
									08:00
								</td>
								<td>
									17:00
								</td>
								<td>
									0 分钟
								</td>
								<td>
									0 分钟
								</td>
								<td>
									0.00 小时
								</td>
								<td>
									0.00 小时
								</td>
								<td>
									0.00 小时
								</td>
								<td>
									0.00 小时
								</td>
								<td>
									0.00 小时
								</td>
							</tr>
						</table>
					</div>
					<div id="trainInfo"></div>
				</ui:tabs>
			</form>
		</ui:dialog>
		<ui:dialog id="staff_add" title="员工入职信息维护" height="300" width="700"
			modal="true">
			<form id="aform"
				action="/eaip/webservice/resources/session/login"
				method="post">
				<table class="table_frame" width="100%">
					<tr>
						<td align="right">
							员工编号:
						</td>
						<td align="left">
							<input type="text" id="funcname" name="funcPO.funcname"
								readonly="readonly" maxlength="128"></input>
							<font color="red">*</font>
						</td>
						<td align="right">
							员工姓名:
						</td>
						<td align="left">
							<input type="text" id="funcname" name="funcPO.funcname"
								readonly="readonly" maxlength="128"></input>
						</td>
					</tr>
					<tr>
						<td align="right">
							入职时间:
						</td>
						<td align="left">
							<ui:datepicker id="entryDate" />
							<font color="red">*</font>
						</td>
						<td align="right">
							所在部门:
						</td>
						<td align="left">
							<input id="deptid_update" type="text" readonly="readonly"
								size="20" onclick="showMenu_dept_update();"
								ondblclick="this.value='';" />
							<div id="dept_menuContent_update" class="dept_menuContent_update"
								style="display: none; position: absolute;">
								<ul id="dept_treeDemo_update" class="ztree"
									style="margin-top: 0; width: 180px; height: 100px;"></ul>
							</div>
							<font color="red">*</font>
						</td>
					</tr>
					<tr>
						<td align="right">
							职务:
						</td>
						<td align="left">
							<select>
								<option>
									取自职务字典
								</option>
							</select>
						</td>
						<td align="right">
							办公电话:
						</td>
						<td align="left">
							<input type="text" id="createdate" readonly="readonly" />
						</td>
					</tr>
					<tr>
						<td align="right">
							工作邮箱:
						</td>
						<td align="left">
							<input id="" type="text" />
						</td>
						<td align="right">
							职等:
						</td>
						<td align="left">
							<select>
								<option value="">
									取自职等字典
								</option>
							</select>
						</td>
					</tr>
					<tr>
						<td align="right">
							职级:
						</td>
						<td align="left">
							<select>
								<option value="">
									取自职级字典
								</option>
							</select>
						</td>
						<td align="right">
							社保增员时间:
						</td>
						<td align="left">
							<ui:datepicker id="ssAddDate" />
						</td>
					</tr>
					<tr>
						<td align="right">
							公积金增员时间:
						</td>
						<td align="left">
							<ui:datepicker id="psAddDate" />
						</td>
						<td align="right">
							档案调入时间:
						</td>
						<td align="left">
							<ui:datepicker id="fInDate" />
						</td>
					</tr>
					<tr>
						<td align="right">
							集体户口转入时间:
						</td>
						<td align="left">
							<ui:datepicker id="reInDate" />
						</td>
						<td align="right">
							社保减员时间:
						</td>
						<td align="left">
							<ui:datepicker id="foDelDate" />
						</td>
					</tr>
					<tr>
						<td align="right">
							公积金减员时间:
						</td>
						<td align="left">
							<ui:datepicker id="reInDate" />
						</td>
						<td align="right">
							档案调出时间:
						</td>
						<td align="left">
							<ui:datepicker id="fOutDelDate" />
						</td>
					</tr>
					<tr>
						<td align="right">
							集体户口转出时间:
						</td>
						<td align="left">
							<ui:datepicker id="reOutDate" />
						</td>
						<td align="right">
							岗位类别:
						</td>
						<td align="left">
							<select>
								<option>
									取自岗位类别字典
								</option>
							</select>
						</td>
					</tr>
					<tr>
						<td align="right">
							在职状态:
						</td>
						<td align="left">
							<select>
								<option>
									在职状态字典
								</option>
							</select>
						</td>
						<td align="right">
							备注:
						</td>
						<td align="left">
							<textarea rows="4" cols="40"></textarea>
						</td>
					</tr>
					<tr>
						<td align="right" colspan="2">
							<input type="button" value="保存" class="button_image"
								id="btn_update" />
						</td>
						<td align="left" colspan="2">
							<input type="reset" value="重置" class="button_image" />
						</td>
					</tr>
				</table>
			</form>
		</ui:dialog>
	</body>
</html>
